import http from '../network/http'

export default {
  submit0(subjectInfo){
    return http({
      url: '/xiyun/service/subject/addSubjectInfo',
      method: 'post',
      data: subjectInfo
    })
  },
//获取所有课程信息
  getSubjectInfos(){
    return http({
      url: '/xiyun/service/subject/getAllSubjects',
      method: 'get'
    })
  },

  //获取课程分类
  getSubjectSorted(){
    return http({
      url: '/xiyun/service/subject/sort/getSubjectSorted',
      method: 'get'
    })
  },

  //获取课程最终发布信息
  getPublishInfo(subjectId){
    return http({
      url: `/xiyun/service/subject/getPublishSubjectInfo/${subjectId}`,
      method: 'get'
    })
  },

  //发布课程最终信息
  publishInfo(subjectInfoId){
    return http({
      url: `/xiyun/service/subject/publishSubject/${subjectInfoId}`,
      method: 'get'
    })
  },

  //删除课程所有信息
  dropSubject(subjectId){
    return http({
      url: `/xiyun/service/subject/dropSubjectInfo/${subjectId}`,
      method: 'get'
    })
  }

}
